.class public Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;
.super Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;
.source "ImageAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;
    }
.end annotation


# instance fields
.field private i:I

.field private j:I

.field private k:I


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1, p2}, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;-><init>(Landroid/content/Context;Landroid/os/Handler;)V

    const/4 p1, 0x0

    .line 2
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->i:I

    const/4 p2, 0x4

    .line 3
    iput p2, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->j:I

    .line 4
    iput p1, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->k:I

    .line 5
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->l()V

    const-string p2, "pic://"

    .line 6
    invoke-virtual {p0, p2, p1}, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->c(Ljava/lang/String;Z)V

    return-void
.end method


# virtual methods
.method public l()V
    .locals 7

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->d:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/pop/utils/t;->d(Landroid/content/Context;)[I

    move-result-object v0

    const/4 v1, 0x0

    .line 2
    aget v2, v0, v1

    const/4 v3, 0x1

    aget v4, v0, v3

    invoke-static {v2, v4}, Ljava/lang/Math;->min(II)I

    move-result v2

    .line 3
    aget v4, v0, v1

    aget v0, v0, v3

    invoke-static {v4, v0}, Ljava/lang/Math;->max(II)I

    move-result v0

    .line 4
    iget-object v4, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->d:Landroid/content/Context;

    invoke-static {v4}, Lcom/estrongs/android/pop/utils/t;->i(Landroid/content/Context;)Z

    move-result v4

    .line 5
    iget-object v5, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->d:Landroid/content/Context;

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v5

    iget v5, v5, Landroid/content/res/Configuration;->orientation:I

    if-ne v5, v3, :cond_0

    const/4 v1, 0x1

    .line 6
    :cond_0
    iget v3, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->j:I

    if-nez v1, :cond_2

    if-eqz v4, :cond_1

    goto :goto_0

    :cond_1
    int-to-double v3, v3

    int-to-double v5, v0

    int-to-double v1, v2

    .line 7
    invoke-static {v5, v6}, Ljava/lang/Double;->isNaN(D)Z

    invoke-static {v1, v2}, Ljava/lang/Double;->isNaN(D)Z

    div-double/2addr v5, v1

    invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v3, v3, v5

    double-to-int v1, v3

    .line 8
    div-int/2addr v0, v1

    iput v0, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->i:I

    goto :goto_1

    .line 9
    :cond_2
    :goto_0
    div-int/2addr v2, v3

    iput v2, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->i:I

    .line 10
    :goto_1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->d:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f0700a4

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I

    move-result v0

    iput v0, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->k:I

    return-void
.end method

.method public onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
    .locals 5

    .line 1
    check-cast p1, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;

    .line 2
    iget v0, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->i:I

    iget v1, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->k:I

    mul-int/lit8 v1, v1, 0x2

    sub-int/2addr v0, v1

    .line 3
    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v0, v0}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 4
    iget-object v0, p1, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;->a:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 5
    invoke-virtual {p0, p2}, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->getItem(I)Lcom/estrongs/fs/g;

    move-result-object v0

    if-nez v0, :cond_0

    return-void

    .line 6
    :cond_0
    invoke-interface {v0}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p1, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;->a:Landroid/widget/ImageView;

    const/4 v3, 0x1

    const v4, 0x7f0803da

    invoke-static {v1, v2, v0, v4, v3}, Lcom/estrongs/android/icon/loader/c;->a(Ljava/lang/String;Landroid/widget/ImageView;Lcom/estrongs/fs/g;IZ)V

    .line 7
    iget-object v1, p1, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;->c:Landroid/widget/RelativeLayout;

    new-instance v2, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$a;

    invoke-direct {v2, p0, v0, p1, p2}, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$a;-><init>(Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;Lcom/estrongs/fs/g;Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;I)V

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 8
    invoke-virtual {p0, v0}, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->a(Lcom/estrongs/fs/g;)Z

    move-result p2

    if-eqz p2, :cond_1

    .line 9
    iget-object p1, p1, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;->b:Landroid/widget/CheckBox;

    const/4 p2, 0x0

    invoke-virtual {p1, p2}, Landroid/widget/CheckBox;->setVisibility(I)V

    goto :goto_0

    .line 10
    :cond_1
    iget-object p1, p1, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;->b:Landroid/widget/CheckBox;

    const/4 p2, 0x4

    invoke-virtual {p1, p2}, Landroid/widget/CheckBox;->setVisibility(I)V

    :goto_0
    return-void
.end method

.method public bridge synthetic onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
    .locals 0

    .line 1
    invoke-virtual {p0, p1, p2}, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;->onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;

    move-result-object p1

    return-object p1
.end method

.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;
    .locals 2

    .line 2
    new-instance p1, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;

    iget-object p2, p0, Lcom/estrongs/android/pop/app/filetransfer/adapter/AbsSelectFileAdapter;->d:Landroid/content/Context;

    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object p2

    const v0, 0x7f0c035f

    const/4 v1, 0x0

    invoke-virtual {p2, v0, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    invoke-direct {p1, p0, p2}, Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter$b;-><init>(Lcom/estrongs/android/pop/app/filetransfer/adapter/ImageAdapter;Landroid/view/View;)V

    return-object p1
.end method
